package com.gqb.xml;

import com.gqb.spring.bean.BeanA;
import com.gqb.spring.bean.BeanUtil;
import com.gqb.spring.framework.BeanFactory;
import com.gqb.spring.framework.FacadeBeanFactory;
import com.gqb.spring.tag.Bean;

public class WriteSpring2 {
	public static void main(String[] args) {
		try {
			/*BeanA beanA=(BeanA) BeanUtil.getBean("beanA");
			System.out.println(beanA.getTitle());
			System.out.println(beanA.getBeanB().getTitle());*/
			FacadeBeanFactory facadeBeanFactory=new FacadeBeanFactory("beans.xml");
			BeanA beanA=(BeanA) facadeBeanFactory.getBean("beanA");
			System.out.println(beanA.getTitle());
			System.out.println(beanA.getBeanB().getTitle());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
